<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    
	
	<title>_${customer.customerName}_出库信息</title>
	<script type="text/javascript">
	
        $(function() {
		    $("#queryForm").validate(); 
			$("#_fromDate").datepicker({ format : 'yyyy-mm-dd' });
			$("#_toDate").datepicker({ format : 'yyyy-mm-dd' });
       });
       
       
    </script>
</head>

<body>
	<div style="height: 10px;"></div>
	
	<form class="form-search" id="queryForm" action="${ctx}/outstorageInfo/queryOutstorageInfo" method="post">
	<table class="table  table-bordered table-condensed" style="margin-top: 0px;">
		<thead>
			<th style="vertical-align: middle; color: white; " colspan="1" bgcolor="#8EB4CB">条件查询</th>
		</thead>
		<tr style="height: 50px;">
		   <td>
			    <label style="margin-left: 10px;">商家名称：</label>
				 <select  name="_customerCode"  id="_customerCode" value="${_customerCode}"  class="required" style="width: 157px;" onchange="ajaxAreaGroup(this,'_warehouseCode');">
					<option value=""></option>
					<c:forEach items="${customerList}" var="customer">
						<option value="${customer.customerCode}"
						<c:if test="${_customerCode eq customer.customerCode}">selected=selected</c:if>
						>${customer.customerName}</option>
					</c:forEach>
				</select>
				
				<label style="margin-left:10px;">仓库名称：</label>
				<select  name="_warehouseCode"  id="_warehouseCode" value="${_warehouseCode}" style="width: 157px;" class="required">
					<option value=""></option>
					<c:forEach items="${warehouseList}" var="wm">
						<option value="${wm.groupCode}"
						<c:if test="${_warehouseCode eq wm.groupCode}">selected=selected</c:if>
						>${wm.groupName}</option>
					</c:forEach>
				</select>
				
				<label>&nbsp;&nbsp;&nbsp;出库日期：</label> 
			 	<input type="text" name="_fromDate" id="_fromDate"  class="input-small" value="${_fromDate}"> 
			 	<label>至：</label> 
			 	<input type="text" name="_toDate" id="_toDate" class="input-small" value="${_toDate}" style="margin-left: -10px;"> 
				
		  </td></tr>
		  
		  <tr style="height: 50px;">
		   <td>
				<label style="margin-left:10px;">作业批次：</label> 
				<input  name="_batchCode"  id="_batchCode" value="${_batchCode}"  class="input-medium" />
				
				<label style="margin-left:10px;">SKU编号：</label> 
				<input  name="_sku"  id="_sku" value="${_sku}" class="input-medium" />
			 	
			    <button type="submit" class="btn btn-primary" style="margin-left: 10px;">查询</button>
<!-- 			    <button type="submit" class="btn btn-info" style="margin-left: 10px;">导出结果</button> -->
		  </td></tr>
	</table>
	 </form>
	
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><tr>
		    <th style="width: 100px;">序列</th>
		    <th style="width: 100px;">商家</th>
		    <th style="width: 180px;">仓库</th>
		    <th style="width: 80px;">SKU</th>
			<th style="width: 80px;">出库数量</th>
		</tr></thead>
		<tbody>
		
		<c:if test="${empty dtoList or dtoList.size() eq 0}">
	       <tr><td colspan="6" height="50" style="vertical-align:middle; text-align: center;color: gray;font-size: 20px;">无数据</td></tr>
	    </c:if>
		
		<c:if test="${not empty dtoList}">
		<c:forEach items="${dtoList}" var="dto" varStatus="i">
			<tr>
			   <td>${i.count}</td>
			   <td>${dto.customerCode}</td>
			   <td>${dto.warehouseCode}</td>
			   <td>${dto.sku}</td>
			   <td>${dto.num}</td>
			</tr>
		</c:forEach>
		</c:if>
		
		</tbody>
	</table>
	
	
</body>
</html>
